﻿using System;
using viBlog.Controllers;
using visinia.SmartEngine;

public partial class Admin_Pages_viBlog_Dashboard_Items_Summary : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        int postsCount = PostController.GetPostsCount();
        Posts.Text += " " + postsCount.ToString();
        Posts.NavigateUrl = SystemMenu.CallPage("viBlog", "Posts");

        int categoriesCount = CategoryController.GetCategories().Count;
        Categories.Text += " " + categoriesCount.ToString();
        Categories.NavigateUrl = SystemMenu.CallPage("viBlog", "Categories");

        int tagsCount = TagController.GetTags().Count;
        Tags.Text += " " + tagsCount.ToString();
        Tags.NavigateUrl = SystemMenu.CallPage("viBlog", "Tags");

        int commentsCount = CommentController.GetCommentsAdmin().Count;
        Comments.Text += " " + commentsCount.ToString();
        Comments.NavigateUrl = SystemMenu.CallPage("viBlog", "Comments");

        int approvedCommentsCount = CommentController.GetApprovedCommentsAdmin().Count;
        Approved.Text += " " + approvedCommentsCount.ToString();
        Approved.NavigateUrl = SystemMenu.CallPage("viBlog", "Comments", "View", "Approved");

        int pendingCommentsCount = CommentController.GetPendingCommentsAdmin().Count;
        Pending.Text += " " + pendingCommentsCount.ToString();
        Pending.NavigateUrl = SystemMenu.CallPage("viBlog", "Comments", "View", "Pending");       
    }
}